.class Lcom/bitauto/autoeasy/favorite/FavoriteList$2;
.super Ljava/lang/Object;
.source "FavoriteList.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/bitauto/autoeasy/favorite/FavoriteList;->Dialog_02(Lcom/bitauto/autoeasy/selectcar/Object/Dealer;)Landroid/app/AlertDialog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

.field private final synthetic val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;


# direct methods
.method constructor <init>(Lcom/bitauto/autoeasy/favorite/FavoriteList;Lcom/bitauto/autoeasy/selectcar/Object/Dealer;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    iput-object p2, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    .line 359
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 5
    .parameter "dialog"
    .parameter "item"

    .prologue
    .line 361
    packed-switch p2, :pswitch_data_0

    .line 380
    :goto_0
    return-void

    .line 363
    :pswitch_0
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    .line 364
    const-class v2, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;

    .line 363
    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 365
    .local v0, intent01:Landroid/content/Intent;
    const-string v1, "VendorID"

    iget-object v2, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorID()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 366
    const-string v1, "vendorName"

    iget-object v2, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 367
    iget-object v1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    invoke-virtual {v1, v0}, Lcom/bitauto/autoeasy/favorite/FavoriteList;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 370
    .end local v0           #intent01:Landroid/content/Intent;
    :pswitch_1
    iget-object v1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    invoke-static {v1}, Lcom/bitauto/autoeasy/favorite/FavoriteList;->access$3(Lcom/bitauto/autoeasy/favorite/FavoriteList;)Ljava/util/ArrayList;

    move-result-object v1

    iget-object v2, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 371
    iget-object v1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    invoke-static {v1}, Lcom/bitauto/autoeasy/favorite/FavoriteList;->access$4(Lcom/bitauto/autoeasy/favorite/FavoriteList;)Lcom/bitauto/autoeasy/news/Adapter/DealerTitleAdapter;

    move-result-object v1

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/news/Adapter/DealerTitleAdapter;->notifyDataSetChanged()V

    .line 372
    iget-object v1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    invoke-static {v1}, Lcom/bitauto/autoeasy/favorite/FavoriteList;->access$2(Lcom/bitauto/autoeasy/favorite/FavoriteList;)Landroid/content/ContentResolver;

    move-result-object v1

    .line 373
    sget-object v2, Lcom/bitauto/autoeasy/db/provider/FAV_DEALERContentProvider;->CONTENT_URI:Landroid/net/Uri;

    .line 374
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "dealer_id = "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 375
    iget-object v4, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v4}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorID()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    .line 374
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 375
    const/4 v4, 0x0

    .line 372
    invoke-virtual {v1, v2, v3, v4}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 376
    iget-object v1, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->this$0:Lcom/bitauto/autoeasy/favorite/FavoriteList;

    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v3, p0, Lcom/bitauto/autoeasy/favorite/FavoriteList$2;->val$dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 377
    const-string v3, "-\u5df2\u4ece\u6536\u85cf\u5939\u79fb\u9664"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 376
    invoke-static {v1, v2}, Lcom/bitauto/autoeasy/tool/ToolBox;->showToast(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_0

    .line 361
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
